package com.rookie.jeesdp.entity.common;

public class Result {

    private int status;
    private Object data;

    public Result(int status) {
        this.status = status;
    }

    public Result(int status, Object data) {
        this.status = status;
        this.data = data;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }


    public Object getData() {
        return data;
    }

    public void setData(Object data) {
        this.data = data;
    }

    public static Result success() {
        return new Result(1);
    }

    public static Result success(Object data) {
        return new Result(1);
    }

    public static Result error() {
        return new Result(0);
    }

    public static Result error(Object data) {
        return new Result(0, data);
    }

}
